<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>找回密码 - 爽客网</title>
<%@include file="../common/js.jsp" %>
<%@include file="../common/css.jsp" %>
<link href="../../css/other.css" type="text/css" rel="stylesheet" />
<!--[if ie 6]><script src="../js/common/iepng.js" type="text/javascript"></script><![endif]-->
<!--[if ie 6]><link href="../../css/jrIE6.css" type="text/css" rel="stylesheet"><![endif]-->
<!--[if ie 6]><link href="../../css/jrIE.css" type="text/css" rel="stylesheet"><![endif]-->

<script type="text/javascript">
			/* $(function() {
				$("#vCode").val('');
				$("#yzm_src").attr("src","verifyCode.htm?time="+(new Date()).getTime());
			}); */
			
			$(document).ready(function() {
				// 表单验证使用属性validate进行验证
				$.metadata.setType("attr", "validate");
				$("#vCode").val('');
				$("#yzm_src").attr("src","verifyCode.htm?time="+(new Date()).getTime());
				$("#findForm").validate(
						{
							errorClass:"register_error",
							success : function(label) {
								label.addClass("register_success").text("");
							},
							rules : {
								email : {
									required : true,
									email : true,
									remote : 'findEmail.htm',
									maxlength : 50
								}
							},
							messages : {
								email : {
									required : "请填写邮箱",
									email : "请填写正确的邮箱地址",
									remote : "该邮箱不存在",
									maxlength : "请输入正确的邮箱地址"
								}
							},
							submitHandler : function() {
								$.post("findPwdEmail.htm", {
										email : $("#email").val(),
										vCode: $("#vCode").val()
									}, function(data) {
										if (data == 'success') {
											alert("发送成功");
											/* $("#reg_btn").attr("disabled",true);
											window.location = "rSuccess.htm"; */
										} 
										if(data == 'codeError'){
											alert("验证码不正确！");
										}
										if(data == 'error'){
											alert("发送失败！");
										}
									});
							}
						});
			});
</script>
</head>

<body>
	
     <%@include file="../common/header.jsp" %>

	<div class="wrap">
    	
        <div class="box_s1">
        	<div class="head"></div>
            <div class="content find_h">
            	<h1 class="title"><img src="../../images/smallpic/icon_31.gif" />找回密码</h1>
                <div class="mg_fp_s1">
                	<p class="step_tip f_mail"></p>
                	<form action="" id="findForm">
	                    <div class="find_box">
	                    	<ul class="check_mail">
	                        	<li>
	                            	<label class="label">您的Email地址：</label><input type="text" id="email" name="email"/>
	                            </li>
	                            <li>
	                            	<label class="label">验证码：</label><input type="text" class="yzm" id="vCode"/><img src="" id="yzm_src"  class="ml5 yzm_pic" />
	                            	<a href="javascript:void(0);" class="change" onclick="changeOne();">换一张</a>
	                            </li>
	                            <li>
	                            	<input type="submit" class="psd_btn" />
	                            </li>
	                        </ul>
	                    </div>
                    </form>
                </div>
            </div>
        	<div class="foot"></div>
        </div>

    </div>
    
   <!--footer-->
    <%@include file="../common/footer.jsp" %>
    <!--footer--end-->
</body>
</html>
